package com.ph.shopping.facade.product.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.ph.shopping.common.core.base.BaseEntity;

@Table(name="ph_product")
public class PhProduct extends BaseEntity  implements Serializable{
	
    /**
	 * 
	 */
	private static final long serialVersionUID = 8774795602698574422L;

	

    /** 商品名称 */
    @Column(name="productName")
    @NotBlank(message="[商品名称]不可为空")
   	@Length(max=66,message="[商品名称]最大长度为66个字符")
    private String productName;

    /** 商品数量 */
    @Column(name="productCount")
    @NotNull(message="[商品数量]不可为空")
    @Min(value = 1, message = "商品数量最少为1")
    private Integer productCount;

    /** 市场参考价 */
    @Column(name="referencePrice")
    private BigDecimal referencePrice;

    /** 零售价 */
    @Column(name="retailPrice")
    @NotNull(message="[零售价]不可为空")
    //@Digits(fraction = 0, integer =48,message="零售价格式错误 ") //interger指定整数精度，fraction指定小数精度。
    private BigDecimal retailPrice;

    /** 进货价 */

    @Column(name="purchasePrice")
    @NotNull(message="[进货价]不可为空")
    //@Digits(fraction = 2, integer =48,message="进货价格式错误 ") //interger指定整数精度，fraction指定小数精度。
    private BigDecimal purchasePrice;

    /** 结算价 */
    @Column(name="settlementPrice")
    @NotNull(message="[结算价]不可为空")
    //@Digits(fraction = 2, integer =48,message="结算价格式错误 ") //interger指定整数精度，fraction指定小数精度。
    private BigDecimal settlementPrice;

    /** 促销价 */
    @Column(name="promotionPrice")
    private BigDecimal promotionPrice;

    /** 促销日期起 */
    @Column(name="promotionDateStart")
    private Date promotionDateStart;

    /** 促销日期止 */
    @Column(name="promotionDateEnd")
    private Date promotionDateEnd;

    /** 商品描述 */
    @Column(name="description")
    private String description;

    /** 商品类别id */
    @Column(name="productClassifyId")
    private Long productClassifyId;

    /** 线上线下状态 1 线上 2 线下 */
    @Column(name="onlineOfflineStatus")
    private Integer onlineOfflineStatus;

    /** 上架下架状态 1 上架 2 下架 */
    @Column(name="saleNoSaleStatus")
    private Integer saleNoSaleStatus;

    /** 审核状态 1 未审核 2 已审核 */
    @Column(name="auditState")
    private Integer auditState;


    /** 删除标记 1未删除 2 已删除 */
    @Column(name="deleteFlag")
    private Integer deleteFlag;

    /** 市级起批数量 */
    @Column(name="municipalBatchQuantity")
    @NotNull(message="[市级起批数量]不可为空")
    @Min(value = 1, message = "市级起批数量最少为1")
    private Integer municipalBatchQuantity;

    /** 商户起批数量 */
    @Column(name="sellerbAtchQuantity")
    @NotNull(message="[ 商户起批数量]不可为空")
    @Min(value = 1, message = "商户起批数量最少为1")
    private Integer sellerbAtchQuantity;

    /** 起售数量 */
    @Column(name="saleQuantity")
//    @NotNull(message="[ 商户起批数量]不可为空")
//    @Min(value = 1, message = "商户起批数量最少为1")
    private Integer saleQuantity;

    /** 商品来源 1 平台 2 代理商 */
    @Column(name="productForm")
    private Integer productForm;

    /** 条形码 */
    @Column(name="barCode")
    private String barCode;

    /** 供应商id */
    @Column(name="supplierId")
    private Long supplierId;

    /** 物流费用 */
    @Column(name="freight")
    private BigDecimal freight;

    /** 创建人 */
    @Column(name="createUser")
    private Long createUser;

    /** 修改人 */
    @Column(name="updateUser")
    private Long updateUser;

    @Column(name="productType")
    private  Integer  productType;
    
    @Column(name="numberOfPackages")
    private  Long  numberOfPackages;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public Integer getProductCount() {
        return productCount;
    }

    public void setProductCount(Integer productCount) {
        this.productCount = productCount;
    }

    public BigDecimal getReferencePrice() {
		return referencePrice;
	}

	public void setReferencePrice(BigDecimal referencePrice) {
		this.referencePrice = referencePrice;
	}

	public BigDecimal getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(BigDecimal retailPrice) {
		this.retailPrice = retailPrice;
	}

	public BigDecimal getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(BigDecimal purchasePrice) {
		this.purchasePrice = purchasePrice;
	}

	public BigDecimal getSettlementPrice() {
		return settlementPrice;
	}

	public void setSettlementPrice(BigDecimal settlementPrice) {
		this.settlementPrice = settlementPrice;
	}

	public BigDecimal getPromotionPrice() {
		return promotionPrice;
	}

	public void setPromotionPrice(BigDecimal promotionPrice) {
		this.promotionPrice = promotionPrice;
	}

	public Date getPromotionDateStart() {
        return promotionDateStart;
    }

    public void setPromotionDateStart(Date promotionDateStart) {
        this.promotionDateStart = promotionDateStart;
    }

    public Date getPromotionDateEnd() {
        return promotionDateEnd;
    }

    public void setPromotionDateEnd(Date promotionDateEnd) {
        this.promotionDateEnd = promotionDateEnd;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Long getProductClassifyId() {
        return productClassifyId;
    }

    public void setProductClassifyId(Long productClassifyId) {
        this.productClassifyId = productClassifyId;
    }

    public Integer getOnlineOfflineStatus() {
        return onlineOfflineStatus;
    }

    public void setOnlineOfflineStatus(Integer onlineOfflineStatus) {
        this.onlineOfflineStatus = onlineOfflineStatus;
    }

    public Integer getSaleNoSaleStatus() {
        return saleNoSaleStatus;
    }

    public void setSaleNoSaleStatus(Integer saleNoSaleStatus) {
        this.saleNoSaleStatus = saleNoSaleStatus;
    }

    public Integer getAuditState() {
        return auditState;
    }

    public void setAuditState(Integer auditState) {
        this.auditState = auditState;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getMunicipalBatchQuantity() {
        return municipalBatchQuantity;
    }

    public void setMunicipalBatchQuantity(Integer municipalBatchQuantity) {
        this.municipalBatchQuantity = municipalBatchQuantity;
    }

    public Integer getSellerbAtchQuantity() {
        return sellerbAtchQuantity;
    }

    public void setSellerbAtchQuantity(Integer sellerbAtchQuantity) {
        this.sellerbAtchQuantity = sellerbAtchQuantity;
    }

    public Integer getSaleQuantity() {
        return saleQuantity;
    }

    public void setSaleQuantity(Integer saleQuantity) {
        this.saleQuantity = saleQuantity;
    }

    public Integer getProductForm() {
        return productForm;
    }

    public void setProductForm(Integer productForm) {
        this.productForm = productForm;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode == null ? null : barCode.trim();
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

   

    public BigDecimal getFreight() {
		return freight;
	}

	public void setFreight(BigDecimal freight) {
		this.freight = freight;
	}

	public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

	public Integer getProductType() {
		return productType;
	}

	public void setProductType(Integer productType) {
		this.productType = productType;
	}

	public Long getNumberOfPackages() {
		return numberOfPackages;
	}

	public void setNumberOfPackages(Long numberOfPackages) {
		this.numberOfPackages = numberOfPackages;
	}

	
	
	

	
    
    
}